<div id="riesgosContainer" class="detailContainer" align="left" style="text-align: left;">
    <table class="detailTable" border="0" align="left" cellpadding=2 cellspacing=2 style="text-align: left;">
        <tr>
            <td align="left">
                <div id="riesgos_detail_title" class="detail_title">Factores Nutricionales Adversos</div>
            </td>
            <td align="right">
                <?php
                    echo $this->element("toolbar",
                        array("toolIds" => array("addId" => "add_riesgo", "editId" => "edit_riesgo", "delId" => "del_riesgo"))
                    );
                ?>
            </td>
        </tr>
            <tr>
                <td id="msgRiesgo" valign="top" colspan="2"></td>
            </tr>
            <tr class="detail-frame" bgColor="#EAEFA5">
                <td class="detail_field" align="left" > Fecha:&nbsp;&nbsp;&nbsp;</td>
                <td align="left">
                        <input id="fecha" name="fecha" type="text" size="10" /><br />
                </td>
            </tr>
            <?php foreach($tiposRiesgo as $tipo){?>
                <tr class="detail-frame" bgColor="#EAEFA5">
                    <td class="detail_field" minLength="1" align="left" colspan="2">
                        <br /><?php echo $tipo['TipoRiesgo']['nombre'];?>:&nbsp;<hr />
                        <?php foreach($tipo['Riesgo'] as $riesgo){?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="checkbox"
                                   id="riesgo_<?php echo $riesgo['id'];?>"
                                   name="riesgo_<?php echo $riesgo['id'];?>"
                            /><?php echo $riesgo['nombre']; ?><br />
                        <?php } ?>
                    </td>
                </tr>
            <?php }?>
		<tr>
			<td class="error" id="errorMessage" colspan="2"></td>
		</tr>
		<tr >
			<td colspan="4" align="right">
		<br />
			<!--<input type="button" name="sbtcancel" id="sbtcancel" value="Cancelar" class="standar-button" onclick="window.parent.$('#detail').dialog( 'close' );" > -->
			<input type="button" name="sbtguardar" id="sbtguardar" value="Guardar" class="standar-button" >
		</td>
		</tr>
	</table>
</div>